import Vue from 'vue'
import VueRouter from 'vue-router'
// import routeModule from './routerModule'
import Home from '../views/Home'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      tabbar:true
    }
  },
  {
    path: '/classify',
    name: 'Classify',
    component: () => import('../views/Classify.vue'),
    meta:{
      tabbar:true
    }
  },
  {
    path: '/cart',
    name: 'Cart',
    component: () => import('../views/Cart.vue'),
    meta:{
      tabbar:true
    }
  },
  {
    path: '/mine',
    name: 'Mine',
    component: () => import('../views/Mine.vue'),
    meta:{
      tabbar:true
    }
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue'),
    meta:{
      tabbar:false
    }
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/Register.vue'),
    meta:{
      tabbar:false
    }
  },
  {
    path: '/details',
    name: 'Details',
    component: () => import('../views/Details.vue'),
    meta:{
      tabbar:false
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
